<?php

namespace App\Http\Traits;

use App\Exceptions\ServiceException;
use App\Exceptions\ServiceExceptionConstant;

trait Errors
{

    /**
     * 抛出异常
     * @throws ServiceException
     */
    public function showError($value)
    {
        throw new ServiceException(ServiceExceptionConstant::getErrorData($value));
    }
}
